<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Categories_List.ascx.cs" Inherits="Framework.Module.UpDownLoad.Web.Categories_List" %>
<script language="javascript">

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
</script>
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <th scope="col">
            <img src="/images/HomePage/n_top_left_mn.jpg" width="200" height="34" />
        </th>
    </tr>
    <tr>
        <th background="/images/HomePage/n_bg_left_mn.jpg" scope="col">
            <table border="0" id="masterdiv" background="/images/HomePage/n_bg_left_mn.jpg" cellpadding="0"
                cellspacing="0" style="width: 100%">
                <tr>
                    <td>
                        <asp:DataList ID="DataListMenu" runat="server" CellPadding="0" CellSpacing="0" Width="100%"
                            OnItemDataBound="Item_DatalistBound">
                            <ItemTemplate>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr onclick="SwitchMenu('<%# Eval("ID") %>')">
                                        <td width="12">
                                        </td>
                                        <td height="27" width="90%" style="cursor: pointer">
                                            <img src="/images/HomePage/n_icon_mn.gif" width="12" height="5" />
                                            <asp:Label ID="lbllayout" CssClass="text2" runat="server" Text='<%# Eval("Name")%>'></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th scope="col">
                                        </th>
                                        <th background="/images/HomePage/line1.gif" scope="col">
                                            <img src="/images/HomePage/blank.gif" width="1" height="1" /></th>
                                        <th scope="col">
                                        </th>
                                    </tr>
                                    <tr id="<%# Eval("ID") %>" style="display: none">
                                        <td colspan="2" align="center">
                                            <asp:DataList ID="DataListMenuSub" runat="server" Width="100%">
                                                <ItemTemplate>
                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                        <tr>
                                                            <td height="27" align="center">
                                                                <div style="padding-left: 30px">
                                                                    <a href="<%# BuildUrlbyPortal(Framework.Library.Utilities.ConvertUtility.ToInt32(Eval("ID"))) %>">
                                                                        <%# Eval("Name")%>
                                                                    </a>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:DataList>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:DataList></td>
                </tr>
            </table>
        </th>
    </tr>
    <tr>
        <th scope="col">
            <img src="/images/HomePage/n_bottom_left_mn.jpg" width="200" height="34" /></th>
    </tr>
</table>
</div>

